package com.bwie.auth.remote.factory;

import com.bwie.auth.remote.RemoteSystemService;
import com.bwie.common.result.Result;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class RemoteSystemFallbackFactory implements FallbackFactory<RemoteSystemService> {
    @Override
    public RemoteSystemService create(final Throwable cause) {
        return new RemoteSystemService(){
//            @Override
//            public Result<User> findByPhone(String phone) {
//                return Result.error("根据手机号查询用户信息失败："+cause.getMessage());
//            }
        };

    }
}
